import com.rongyi.transfer.vo.InsertVo;
import com.rongyi.transfer.vo.UpdateVo;
import org.apache.ibatis.annotations.*;

@Mapper
public interface TransferMapper {
    // c202、c209表额外操作
    @Insert("insert into ${tableName} (${shortName}_id, ${shortName}_id_supp, ${shortName}_var_supp, ${shortName}_date_create, ${shortName}_flag_state) values(#{idSupp}, #{idSupp}, #{varSupp}, sysdate(), '正常')")
    void extraInsert(InsertVo insertVo);

    @Select("select count(*) from ${tableName} where ${shortName}_id = #{idSupp}")
    Integer extraCheck(InsertVo insertVo);

    @Delete("delete from ${tableName} where ${shortName}_id = #{idSupp}")
    void extraDelete(InsertVo insertVo);

    // 反迁移操作原表——配置文件的接收表与当前发送表一致
    @Update("update ${tableName} set ${column} = #{value} where ${shortName}_id = #{id}")
    void extraUpdate(UpdateVo updateVo);
}
